

def group_4(tree):
    # div[32]
    dict_group_4 = {"厨房排风设施":"","燃料类型":"", "饮水":"", "厕所":"", "禽畜栏":""}
    try:
        chufangpaifeng = tree.xpath('//*[@id="ehrForm"]/div[32]//input[@checked="checked"]')[0]
        dict_group_4["厨房排风设施"] = chufangpaifeng.xpath('following-sibling::span/label/text()')[0]
    except:
        dict_group_4["厨房排风设施"] = None

    try:
        chufangpaifeng = tree.xpath('//*[@id="ehrForm"]/div[33]//input[@checked="checked"]')[0]
        dict_group_4["燃料类型"] = chufangpaifeng.xpath('following-sibling::span/label/text()')[0]
    except:
        dict_group_4["燃料类型"] = None

    try:
        chufangpaifeng = tree.xpath('//*[@id="ehrForm"]/div[34]//input[@checked="checked"]')[0]
        dict_group_4["饮水"] = chufangpaifeng.xpath('following-sibling::span/label/text()')[0]
    except:
        dict_group_4["饮水"] = None

    try:
        chufangpaifeng = tree.xpath('//*[@id="ehrForm"]/div[35]//input[@checked="checked"]')[0]
        dict_group_4["厕所"] = chufangpaifeng.xpath('following-sibling::span/label/text()')[0]
    except:
        dict_group_4["厕所"] = None

    try:
        chufangpaifeng = tree.xpath('//*[@id="ehrForm"]/div[36]//input[@checked="checked"]')[0]
        dict_group_4["禽畜栏"] = chufangpaifeng.xpath('following-sibling::span/label/text()')[0]
    except:
        dict_group_4["禽畜栏"] = None

    print("问题不在4")
    return dict_group_4